<template>
	<view class="content">

		<!--  登录页 1 -->
		<view class="login">

			<view class="login-title">
				<view class="logo">

					<image src="https://img1.baidu.com/it/u=2388921172,3383973739&fm=26&fmt=auto&gp=0.jpg" mode="widthFix"></image>
				</view>
				<view class="login-title-1">
					<view class="bb">XX校友会申请获取以下权限</view>
					 <view>为了提供更优质的服务，需要获取您的头像昵称</view>
				</view>


			</view>
			<view class="login-fac" @click="refuse">
				<view class="login-fac-title">
					残忍拒绝
				</view>
				<text class="login-fac-icon text-white cuIcon-right"></text>
			</view>
			
			<view class="login-goo" @tap="getUserProfile" >
				<view class="login-goo-title">
					点击授权
				</view>
				<text class="login-goo-icon text-white cuIcon-right"></text>
			</view>


			<view class="bz">
				版权所有 天夏E家校友会
			</view>

		</view>


	</view>
</template>

<script>
	export default {
		data() {
			return {
				title: 'Hello',
				longitude: "",
				latitude: "",
				isauth: false,
				region_value: [],
				show:false
				
			}
		},
		methods: {
			getUserProfile(){
				uni.getUserProfile({
				     desc: '用于完善会员资料', // 声明获取用户个人信息后的用途，后续会展示在弹窗中，请谨慎填写
				     success: (res) => {
					  
				       this.$u.post('index.php?class=weixin&act=wxLogin', {
						   userinfo:JSON.stringify(res.userInfo),
						   openid: uni.getStorageSync('openid')
						   }).then(res => {
				       	  if (res.code==0){
				               uni.setStorageSync("user",res.data)
							   uni.setStorageSync('uid', res.data.id);
							   if (res.data.status!=2){
								   	this.$u.route("/pages/auth/form")
							   }else{
								    uni.navigateBack({
								        delta: 1
								    });
							   }
				       	  }else{
				       		  this.msg(res.msg)
				       	  }
				       
				       });
				     }
				})
			},
			refuse() {
               this.jumpbar("/pages/index/index")
			},
			
			
			
		
		
			
		}
	}
</script>

<style>
	page{ height: 100%;}
	.content{
		/* background-image: url(../../static/t.jpg);
		background-repeat: no-repeat;
		background-size: 100% 100%; */
		color:#333;
		/* background-color: rgb(64,166,232); */
		width:100%;
		height: 100%;
	}
	.content .uni-title{
		color: #6f6f6f;
		font-size: 20px;
		text-align: center;
		margin: 30upx;
		border-bottom: 1px solid #c9c9c9;
	}
	.bb{font-size: 16px;margin-bottom: 10px; font-weight: bold;}
	.content .uni-title:nth-child(8){
		color: #EE5B5B;
		border-bottom: 1px solid #EE5B5B;
	}
	.content .login{
		width: 100%;
		height: 100%;
		display: flex;
		flex-direction: column;
		align-items: center;
		position: relative;
	}
	.logo{ display: flex;justify-items: center; margin-bottom: 20px;}
	.logo image{width: 180upx; border-radius: 20px;}
	.login .login-title{
		width: 550upx;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		margin-top: 80upx;
	}
	.login .login-title .login-title-1{
		font-size: 14px;
		margin-top: 10px;
		/* font-weight: bold; */
		text-align: center;
		letter-spacing: 5upx;
	}
	.login .login-title .login-title-2{
		margin-top: 5upx;
		font-size: 16px;
	}
	.login .login-fac{
		color: #FFFFFF;
		margin-top:140upx;
	
		width: 560upx;
	
		height: 90upx;
		display: flex;
		justify-content: center;
		align-items: center;
		background-color: #3B5998;
		border: 1px solid #3B5998;
		border-radius: 25px;
	}
	.login-fac .login-fac-title{
		font-size: 16px;
		
	}
	.login-fac .login-fac-icon{
		font-size: 20px;
		margin-right: 30upx;
	}
	.login-twi{
		margin-top: 40upx;
		width: 560upx;
		height: 90upx;
		color: #FFFFFF;
		display: flex;
		justify-content: center;
		align-items: center;
		background-color: #00ACED;
		border: 1px solid #00ACED;
		border-radius: 25px;
	}
	.login-twi .login-twi-title{
		font-size: 16px;
		
		
		text-align: center;
	}
	.login-twi .login-twi-icon{
		font-size: 20px;
		margin-right: 30upx;
	}
	.login-goo{
		margin-top: 40upx;
		color: #FFFFFF;
		width: 560upx;
		height: 90upx;
		display: flex;
		justify-content: center;
		align-items: center;
		background-color: #EE5B5B;
		border: 1px solid #EE5B5B;
		border-radius: 25px;
	}
	.login-goo .login-goo-title{
		font-size: 16px;
		
	}
	.login-goo .login-goo-icon{
		font-size: 20px;
		margin-right: 30upx;
	}
	.login-tip{
		color: #9e9e9e;
		width: 560upx;
		position: absolute;
		bottom: 40upx;
		display: flex;
		align-items: center;
		justify-content: center;
	}
	.login-tip .login-tip-2{
		margin-left: 8upx;
		text-decoration: underline;
	}
	
	.content .Btn{
		width: 80upx;
		height: 80upx;
		border-radius: 50%;
		background-color: rgba(255, 255, 255, 0.2);
		text-align: center;
		font-size: 36px;
		position: absolute;
		bottom: 60upx;
		right: 30upx;
	}
	.bz{ 
		text-align: center;
		width: 560upx;
		margin: 0px auto;
		color: #999;
		line-height: 25px; font-size: 12px; padding: 10px; position: absolute; bottom: 10upx;}
</style>
